maintainer="Hugo Osvaldo Barrera <hugo@whynothugo.nl>"
pkgname=wayidle
pkgver=0.2.0
pkgrel=0
pkgdesc="Wait for wayland compositor idle timeouts"
url="https://git.sr.ht/~whynothugo/wayidle"
# s390x: nix/libc crate
arch="all !s390x"
license="ISC"
makedepends="cargo cargo-auditable"
source="wayidle-$pkgver.tar.gz::https://git.sr.ht/~whynothugo/wayidle/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"
options="net" # fetch dependencies

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

check() {
	cargo test --frozen
}

package() {
	install -Dm 0755 target/release/wayidle -t "$pkgdir"/usr/bin/
}

sha512sums="
6b7e030a12244d7020c8648d791e54ad94808ba0c1f59c0e9ab0f1b9043e03ecc785c078864a6d5d9fc9353c2bd40a0f39aa39ddabef95f0f5a0e6444e3678b6  wayidle-0.2.0.tar.gz
"
